home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / Jogos de Azar / fruit.swf / scripts / C_LinesReelsButtonsCLASS.as < prev    next >
Text File  |  2006-01-17  |  2KB  |  81 lines

  1. _global.C_LinesReelsButtonsCLASS = function()
  2. {
  3. };
  4. C_LinesReelsButtonsCLASS.prototype = new MovieClip();
  5. C_LinesReelsButtonsCLASS.prototype.onLoad = function()
  6. {
  7.    if(!this.pos)
  8.    {
  9.       this.pos = 1;
  10.    }
  11.    this.setPos(this.pos);
  12.    var b;
  13.    var i = 1;
  14.    while(i <= 5)
  15.    {
  16.       b = this["l" + i + "_btn"];
  17.       b.n = i;
  18.       b.addAlt();
  19.       b.onPress = function()
  20.       {
  21.          this._parent.setPos(this.n);
  22.          this._parent.doOut();
  23.       };
  24.       b.onRollOver = function()
  25.       {
  26.          var o = this._parent;
  27.          var h = o.hints[this.n];
  28.          o.doOver();
  29.          if(h != undefined)
  30.          {
  31.             o.showAlt(h);
  32.          }
  33.       };
  34.       b.onDragOut = b.onRollOut = function()
  35.       {
  36.          this._parent.doOut();
  37.          this._parent.hideAlt();
  38.       };
  39.       i++;
  40.    }
  41.    var o = {};
  42.    o[1] = "Bet on ONE payline";
  43.    o[2] = "Bet on TWO paylines";
  44.    o[3] = "Bet on TREE paylines";
  45.    o[4] = "Bet on FOUR paylines";
  46.    o[5] = "Bet on FIVE paylines";
  47.    this.setHints(o);
  48. };
  49. C_LinesReelsButtonsCLASS.prototype.setPos = function(pos)
  50. {
  51.    var i = 1;
  52.    while(i <= 5)
  53.    {
  54.       delete this["l" + i + "_btn"].enabled;
  55.       this["l" + i + "_btn"]._brightness = -50;
  56.       this["l" + i + "_mc"]._brightness = -50;
  57.       i++;
  58.    }
  59.    i = pos;
  60.    this["l" + i + "_btn"].enabled = false;
  61.    this["l" + i + "_btn"]._brightness = 0;
  62.    this["l" + i + "_mc"]._brightness = 0;
  63.    this.pos = pos;
  64.    this.client.client[this.client.handler](this.pos);
  65. };
  66. C_LinesReelsButtonsCLASS.prototype.setHints = function(h)
  67. {
  68.    this.hints = h;
  69. };
  70. C_LinesReelsButtonsCLASS.prototype.addProperty("line",function()
  71. {
  72.    return this.pos;
  73. }
  74. ,C_LinesReelsButtonsCLASS.prototype.setPos);
  75. C_LinesReelsButtonsCLASS.prototype.setChangeHandler = function(client, handler)
  76. {
  77.    this.client = {client:client,handler:handler};
  78. };
  79. ASSetPropFlags(_global,"C_LinesReelsButtonsCLASS",131);
  80. Object.registerClass("C_LinesReelsButtonsCLASS",C_LinesReelsButtonsCLASS);
  81.